{extend name="common/base" }

{block name="style"}
<style type="text/css">
	
</style>
{/block}

{block name="content"}
<form action="{:module_url('index')}" class="search-form">
	<div class="am-g">
		<div class="am-u-sm-12 am-u-md-5">
			<div class="am-btn-toolbar">
				<div class="am-btn-group am-btn-group-xs">
					<a class="am-btn am-btn-default" href="{:module_url('add')}">
						<span class="am-icon-plus"></span> 新增
					</a>
					<a class="am-btn am-btn-default nd-refresh">
						<span class="am-icon-refresh"></span> 刷新
					</a>
				</div>
			</div>
		</div>

		{$widget->search('select', ['name' => 'status', 'value' => $status, 'list' => $storeStatus])}

		{$widget->search('select', ['name' => 'is_ondemand', 'value' => $is_ondemand, 'list' => $isOndemand])}

		{$widget->search('keyword', ['name' => 'keyword', 'holder' => '关键词', 'value' => $keyword, 'md_num' => 3])}
	</div>
</form>

<div class="am-g">
	<div class="am-u-sm-12">
	
		<table class="am-table am-table-striped am-table-radius am-table-bordered">
			<thead>
				<tr>
					<th>排序</th>
					<th>门店名称</th>
					<th>省/市/区</th>
					<th>门店电话</th>
					<th>负责人</th>
					<th>负责人手机</th>
					<th>设备UUID</th>
					<th>所属分组</th>
					<th>点播权限</th>
					<th>门店状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
			{volist name="_list" id="vo"}
				<tr>
					<td class="am-text-middle">
						{$widget->row('text', ['style' => 'width:60px;' ,'value' => $vo['sort'], 'url' => module_url('modify', ['id' => $vo['id'], 'field' => 'sort'])])}
					</td>
					<td class="am-text-middle">{$vo.store_name}</td>
					<td class="am-text-middle">{$vo.province}{$vo.city}{$vo.area}</td>
					<td class="am-text-middle">{$vo.tel}</td>
					<td class="am-text-middle">{$vo.principal}</td>
					<td class="am-text-middle">{$vo.principal_phone}</td>
					<td class="am-text-middle">{$vo.uuid}</td>
					<td class="am-text-middle">
						{$widget->row('select', ['value' => $vo['group_id'], 'list' => $storeGroup, 'url' => module_url('modify', ['id' => $vo['id'], 'field' => 'group_id'])])}
					</td>
					<td class="am-text-middle">
						{$widget->row('select', ['value' => $vo['is_ondemand'], 'list' => $isOndemand, 'url' => module_url('modify', ['id' => $vo['id'], 'field' => 'is_ondemand'])])}
					</td>
					<td class="am-text-middle">
						{$widget->row('select', ['value' => $vo['status'], 'list' => $storeStatus, 'url' => module_url('modify', ['id' => $vo['id'], 'field' => 'status'])])}
					</td>
					<td class="am-text-middle">
						<div class="am-btn-toolbar">
							<div class="am-btn-group am-btn-group-xs">
								{$widget->row('button', ['title' => '编辑', 'class' => 'am-text-secondary', 'icon' => 'am-icon-pencil-square-o', 'url' => module_url('edit', ['id' => $vo['id']])])}
								{$widget->row('button', ['title' => '删除', 'class' => 'am-text-danger ajax-get ajax-confirm', 'icon' => 'am-icon-trash-o', 'url' => module_url('delete', ['id' => $vo['id']])])}
							</div>
						</div>
					</td>
				</tr>
			{/volist}
			</tbody>
		</table>
		
		{if condition="!empty($_page)"}
			<div class="am-fl">共 {$_total} 条记录</div>
			<div class="am-fr">{$_page}</div>
		{/if}
	</div>
</div>
{/block}

{block name="script"}
<script type="text/javascript">
	$(function(){
		
	});
</script>
{/block}